<template>
	<view class="follow_box">
		<view class="box_fir">
			<view class="top_box">
				<view class="top_title">基本信息</view>
			</view>
			<view class="fl_row">
				<view class="fl_col">
					<view class="label">家长姓名：</view>
					<view class="value">张三</view>
				</view>
				<view class="fl_col">
					<view class="label">联系方式：</view>
					<view class="value">17352848891</view>
				</view>
			</view>
			<view class="fl_row">
				<view class="fl_col">
					<view class="label">关系：</view>
					<view class="value">爸爸</view>
				</view>
				<view class="fl_col">
					<view class="label">宝宝姓名：</view>
					<view class="value">张三</view>
				</view>
			</view>
			<view class="fl_row">
				<view class="fl_col">
					<view class="label">宝宝性别：</view>
					<view class="value">男</view>
				</view>
				<view class="fl_col">
					<view class="label">宝宝月龄：</view>
					<view class="value">12</view>
				</view>
			</view>
			<view class="fl_row_no">
				<view class="label">出生年月：</view>
				<view class="value">2024-11-11</view>
			</view>
			<view class="fl_row_no">
				<view class="label">家庭住址：</view>
				<view class="value">湖南省长沙市雨花区香樟路255号</view>
			</view>
		</view>
		<view class="box_sec">
			<view class="top_box">
				<view class="top_title">到访记录</view>
			</view>
			<view class="from_box">
				<u-form :model="form" ref="uForm">
					<u-form-item label-width="180rpx" label="预约试托时间" class="rules_item">
						<view class="rules_tip" style="left: 161rpx;">*</view><u-input v-model="form.birthdate"
							type="select" :select-open="pickerTime1" @click="pickerTime1 = true"
							placeholder="请选择试托到访时间" />
					</u-form-item>
					<u-form-item label-width="180rpx" label="到访详情" prop="title" class="rules_item">
						<view class="rules_tip">*</view>
						<u-input v-model="form.title" placeholder="请输入到访详情" />
					</u-form-item>
					<u-form-item label-width="180rpx" label="图片" prop="title" class="rules_item">
						<u-upload :action="action" :file-list="fileList" ref="uUpload"></u-upload>
					</u-form-item>
					
					<u-form-item label-width="180rpx" label="下次跟进时间" class="rules_item">
						<view class="rules_tip" style="left: 161rpx;">*</view><u-input v-model="form.birthdate"
							type="select" :select-open="pickerTime1" @click="pickerTime1 = true"
							placeholder="请选择下次跟进时间" />
					</u-form-item>
				</u-form>
			</view>
		</view>
		<view class="btn_box">
			<u-button type="warning" shape="circle" class="from_sub" @click="handleSubmit">提 交</u-button>
		</view>
		<u-picker mode="time" v-model="pickerTime1" @confirm="(e)=>timeConfirm(e,'start')" :params="params"></u-picker>
		<u-action-sheet :tips="tips" :list="selectlist" v-model="showSex" @click="actionSheetCallback"></u-action-sheet>
		<!-- 提示 -->
		<u-toast ref="uToast" />
		<u-top-tips ref="uTips"></u-top-tips>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				radioList: [{
						name: '是',
						disabled: false
					},
					{
						name: '否',
						disabled: false
					}
				],
				action: 'http://www.example.com/upload',
				fileList: [], // 初始值
				pickerTime1: false, //控制日期显示
				params: {
					year: true,
					month: true,
					day: true,
					hour: false,
					minute: false,
					second: false,
					timestamp: false,
				},
				tips: {

					text: '请选择性别',

					color: '#909399',

					fontSize: 24

				},
				showSex: false,
				selectlist: [{
						text: '男'
					},
					{
						text: '女'
					}
				],
				form: {
					title: '',
					address: '',
					class: '',
					birthdate: '',
					remark: ''
				},
			}
		},
		methods: {
			timeConfirm(e, type) {
				console.log(e);
				this.form.birthdate = e.year + '年' + e.month + '月' + e.day + '日' 
			},
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .u-form-item--left__content__label{
		color: #999999 !important;
	}
	.from_sub {
		margin-top: 30rpx;
		width: 90%;
	}

	.btn_box {
		position: fixed;
		bottom: 0px;
		display: flex;
		justify-content: space-evenly;
		width: 100%;
		background: #fff;
		left: 0;
		align-items: center;
		padding-bottom: 38rpx;
	}

	.rules_item {
		position: relative;

		.rules_check {
			top: 43% !important;
		}

		.rules_tip {
			position: absolute;
			color: red;
			left: 112rpx;
			top: 20rpx;
		}
	}

	.follow_box {
		margin: 32rpx;
		padding: 32rpx;
		background-color: #fff;
		border-radius: 20rpx 20rpx 20rpx 20rpx;

		.box_fir {
			border-bottom: 2rpx dashed #EDEEF0;
			padding-bottom: 20rpx;

			.top_box {
				margin-bottom: 20rpx;

				.top_title {
					font-weight: 500;
					font-size: 28rpx;
					color: #333333;
					border-left: 6rpx solid #FF8B00;
					/* padding: 8rpx; */
					padding-left: 15rpx;
					line-height: 13px;
				}
			}
		}

		.box_sec {
			margin-top: 30rpx;

			.top_box {
				margin-bottom: 20rpx;

				.top_title {
					font-weight: 500;
					font-size: 28rpx;
					color: #333333;
					border-left: 6rpx solid #FF8B00;
					/* padding: 8rpx; */
					padding-left: 15rpx;
					line-height: 13px;
				}
			}
		}

		.fl_row_no {
			margin: 30rpx 0rpx;
			display: flex;
			align-items: center;

			.label {
				font-weight: 400;
				font-size: 28rpx;
				color: #999999;
			}

			.value {
				font-weight: 400;
				font-size: 28rpx;
				color: #333;
			}
		}

		.fl_row {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin: 30rpx 0rpx;

			.fl_col {
				display: flex;
				flex: 1;

				.label {
					font-weight: 400;
					font-size: 28rpx;
					color: #999999;
				}

				.value {
					font-weight: 400;
					font-size: 28rpx;
					color: #333;
				}
			}
		}
	}
</style>